using System;
using Voodoo.Sauce.Internal.CrossPromo.Models;

namespace Voodoo.Sauce.Internal.CrossPromo
{
	internal class CrossPromoEvents
	{
		internal static event Action<string> OnInitComplete;

		internal static event Action<AssetModel> OnClick;

		internal static event Action<AssetModel> OnShown;

		internal static event Action<Exception> OnError;

		internal static void TriggerInitComplete(string format)
		{
			CrossPromoEvents.OnInitComplete?.Invoke(format);
		}

		internal static void TriggerClickEvent(AssetModel asset)
		{
			CrossPromoEvents.OnClick?.Invoke(asset);
		}

		internal static void TriggerShownEvent(AssetModel asset)
		{
			CrossPromoEvents.OnShown?.Invoke(asset);
		}

		internal static void TriggerErrorEvent(Exception message)
		{
			CrossPromoEvents.OnError?.Invoke(message);
		}
	}
}
